package com.atguigu.springcloud.alibaba.controller;

import com.atguigu.springcloud.alibaba.bean.OrderEntity;
import com.atguigu.springcloud.alibaba.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author timiv
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/order/save")
    public String order(OrderEntity order){
        orderService.saveOrder(order);
        return "下单成功";
    }
}
